package com.yuyu.demo.spring4.jihe;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import com.yuyu.demo.spring4.beans.Car;

public class TestForJiHe {
	
	private static final String Car = null;
	private static ApplicationContext applicationContext;
	
	public static void main(String[] args) {
		//初始化容器  ClassPathXmlApplicationContext FileSystemtXmlApplicationContext
		applicationContext = new ClassPathXmlApplicationContext("appJiHe.xml");
		
		Person person = (Person)applicationContext.getBean("person");
		
		System.out.println(person.toString());
		
		Car car = (Car)applicationContext.getBean("carP");
		System.out.println(car.toString());
	}
}
